import React, { useEffect } from "react";
import { Navigate } from "umi";

const Author = (Component: React.FC) => {


    if (sessionStorage.getItem('token')) {
        return <Component />;
    } else {
        return <Navigate to="/login" />;
    }

}


export default Author